<template>
  <div class="video-page">
    <Header></Header>
    <div class="content">
        <div class="center-header">
            <h3>{{this.videoPageList.title}}</h3>
        </div>
       <p>{{this.videoPageList.created_at}}</p>
        <div class="videos">
            <video :src = "this.videoPageList.video_url"  controls="controls" :poster = "this.videoPageList.cover"></video>
        </div>
        <div class="words">
            <p v-html="this.videoPageList.body"></p>
        </div>
    </div>
    <Interactive></Interactive>       
  </div>
</template>
<script>
import Interactive from '../../interactive/Interactive'
import Header from '../../productVideo/components/Header'
export default {
  name: 'VideoPage',
  data(){
      return {
        videoPageList: [],
        id: null
      }
  },
  components: {
      Interactive,
      Header
  },
  created(){
      this.getId();
      this.axios.get('/articles/' + this.id,{
          id: this.id
      })
      .then((res) => {
          this.videoPageList = res.data.data;
          console.log(res.data.data);
      })
      .catch((error) => {
          console.log(error);
      })
  },
  methods: {
      getId(){
          this.id = this.$route.params.id
      }
  }
}
</script>
<style scoped>
.video-page{
    width: 100%;
    height: auto;
}
.video-page .content{
    margin-top: .4rem;
    width: 100%;
    height: auto;
    text-align: center;
}
.video-page .content .center-header{
    width: 100%;
    height: auto;
}
.video-page .content .center-header h3{
    font-size: 16PX;
    color: #333;
}
.video-page .content>p{
    font-size: 12px;
    color: #ccc;
    margin-top: .2rem;
}
.video-page .content .videos{
    margin-top: .4rem;
}
.video-page .content .videos video{
    width: 6.7rem;
    height: 4.5rem;
}
.video-page .content .words{
    font-size: 14px;
    width: 6.7rem;
    margin-left: .4rem;
    margin-bottom: 1.5rem;
}
.video-page .content .words p{
    font-size: 14px;
}
.video-page .content .words p img{
    width: 100%;
    height: auto;
}
</style>
